<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <p class="test">hello world</p>
    <script>
    /* 克隆节点 cloneNode */
        var test=document.getElementsByClassName("test")[0];
        var cTest=test.cloneNode(true);
        document.body.appendChild(cTest)
    </script>
</body>
</html>